package com.atguigu.gulimall.gulimallauthserver.feign;

import com.atguigu.common.utils.R;
import com.atguigu.gulimall.gulimallauthserver.feign.fallback.MemberFeignServiceFallBack;
import com.atguigu.gulimall.gulimallauthserver.vo.SocialUserVo;
import com.atguigu.gulimall.gulimallauthserver.vo.UserLoginVo;
import com.atguigu.gulimall.gulimallauthserver.vo.UserRegistVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 会员远程服务
 *
 * @author xiaoping
 * @create 2020/6/30 15:34
 * @since 1.0.0
 */
@FeignClient(value = "gulimall-member",fallback = MemberFeignServiceFallBack.class)
public interface MemberFeignService {

    /**
     * 会员注册
     * @param vo
     * @return
     */
    @PostMapping("/member/member/regist")
    R regist(@RequestBody UserRegistVo vo);

    /**
     * 会员登录
     * @param vo
     * @return
     */
    @PostMapping("/member/member/login")
    R login(@RequestBody UserLoginVo vo);

    /**
     * 会员社交登录
     * @param vo
     * @return
     */
    @PostMapping("/member/member/oauth2/login")
    R oauthLogin(@RequestBody SocialUserVo vo);


}
